@isTest
private class icnCtlr_Tests {

    public static testMethod void testMyController() 
    {
        //test Data
        Account acc = new Account();
        acc.Name = 'Test';
        insert acc;
        
        Emirates__c emiratesObject = new Emirates__c();
        emiratesObject.Name = 'Test';
        emiratesObject.Active__c = true;
        emiratesObject.E_form_code__c = 'Test';
        insert emiratesObject;
        
        City__c cityObject = new City__c();
        cityObject.Name = 'Test';
        cityObject.Active__c = true;
        cityObject.E_form_code__c = 'Test';
        cityObject.Emirates__c  = emiratesObject.Id;
        insert cityObject;
        
        Area__c areaObject = new Area__c();
        areaObject.Name = 'Test';
        areaObject.Active__c = true;
        areaObject.E_form_code__c = 1;
        areaObject.City__c = cityObject.Id;
        insert areaObject;
        
        Country__c Countries = new Country__c();
        Countries.Name = 'Test';
        Countries.eFormCode__c = 'Test';
        Countries.IsActive__c = true;
        insert COuntries;
        
        
        CountriesList__c CountriesList = new CountriesList__c();
        CountriesList.Name = 'Test';
        CountriesList.IsActive__c = true;
        CountriesList.eFormCode__c = 'Test';
        insert CountriesList;
        
        Occupation__c OCP = new Occupation__c();
        OCP.Name = 'Test';
        OCP.IsActive__c = true;
        OCP.eFormCode__c = 'Test';
        insert OCP;
        
        PageReference pageRef = Page.icn;
        Test.setCurrentPage(pageRef);
        icn_ctlr controller = new icn_ctlr();
        
        List<SelectOption> TestOptions = new List<SelectOption>();
        TestOptions = controller.getRequestTypes();
        TestOptions = controller.getCompanies();
        TestOptions = controller.getTitles();
        TestOptions = controller.getMaritalStatuses();
        TestOptions = controller.getQualifications();
        TestOptions = controller.getCountries();
       
        
        controller.Render_NewDesignation();
        PageReference Pg;
        Pg = controller.ResetApplication();
        Pg = controller.ToMainMenu();
        //Pg = controller.CreateApplication();
        
        controller.Application.TAMM_VIP_Service__c = true;
        controller.Application.request_type__c = 'New Passport';
        
       // Occupation__c OCP = [Select id, name FROM Occupation__c LIMIT 1];
        controller.Application.Previous_Job_Title_Position__c = OCP.id; 
        controller.Application.Job_Title_Position__c = OCP.id;
        
        controller.Application.Previous_Passport_Number__c = '123456';
        controller.Application.Passport_Number__c = '987654';
        
        controller.Application.Title__c = 'Mr';
        controller.Application.First_Name__c = 'Cloud';
        controller.Application.Middle_Name__c = 'S';
        controller.Application.Last_Name__c = 'Concept';
        controller.Application.Passport_Number__c = '454754785';
        controller.visaIssueDate = String.ValueOf(Date.TODAY());
        controller.Application.Mother_Full_Name__c = 'r';
        controller.Application.P_O_Box__c = '1';
        controller.Application.inside_residence_telephone__c = '2';
        controller.Application.inside_office_telephone__c = '3';
        controller.Application.Applicant_Mobile_Number__c = '4';
        
       // Account acc = [SELECT id, name FROM Account LIMIT 1];
        controller.Application.Company_Name__c = acc.id;
        controller.Application.Name_of_Authorized_Signatory__c = 'SOMEONE';
        controller.companyDate = String.ValueOf(Date.TODAY());
        
        
        
        
        Pg = controller.CreateApplication();
        icn_ctlr controller1 = new icn_ctlr();
        Pg = controller1.CreateApplication();
        
    }
}